package command;

import javax.swing.JButton;

import arbori.ArboreFunctional;

public abstract class ArgDependentCommand extends JButton implements Command {
/**
 * interfata care furnizeaza celorlalte clase valoarea punctului in care se face 
 * calculul si functia reprezentata atat ca String, cat si ca arbore
 */
	double valX;
	String expresie;
	static ArboreFunctional functie;
	
	public void setValX(double valX) {
		this.valX = valX;
	}
	
	public double getValX() {
		return valX;
	}
	

	
	public static void setFunctie(String ft)
	{
		parsare p=new parsare(ft);
		p.run();
		functie = p.getArbore(); 
	}
	public static void setFunctie(ArboreFunctional ft)
	{
		functie = ft;
	}
	
	public static ArboreFunctional getFunctie()
	{
		return functie;
	}
	
	abstract public void execute();

}
